﻿// Copyright (c) Vitaly Kamiansky. All rights reserved. 
// See License.txt in the project root.

using System;

namespace Property.Objects
{
    public partial class GetPropertyPrototype<T> : DelegatePropertyPrototype<T>, IPropertyPrototype<T>
    {
        public GetPropertyPrototype(IReloaderPrototype<T> reloaderPrototype, Func<T, T> getValue)
            : base(reloaderPrototype, getValue)
        { }

        //=//

        public IProperty<T> Create(T defaultValue)
        {
            return new PropertyInstance(_ReloaderPrototype, _GetValue, defaultValue);
        }
    }
}
